t = readmatrix('C.out', 'FileType', 'text');
x = -5:0.001:5;
figure;
for i = 1:3
    yi = t(i, :);
    plot(x, yi);
    hold on;
end
l = {'true cruve', 'cubic cardinal', 'quadratic cardina'};
legend(l);
saveas(gcf, '../pic/C.eps');

t = readmatrix('D.out', 'FileType', 'text');
x = -5:0.001:5;
Y1 = t(1,:);
Y2 = t(2,:);
figure;
plot(x, Y1);
hold on;
plot(x, Y2);
l = {'error of cubic B-spline','error of quadratic B-spline'};
legend(l);
saveas(gcf, '../pic/D.eps');